<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="text/html;charset=utf-8">
<title>项目问题管理系统主页</title>
<link href="resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="resources/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
<link href="resources/css/index.css" rel="stylesheet">
</head>
<body>
	<s:include value="header-common.jsp" />
	<h2 style="text-align:center">
		<span class="glyphicon glyphicon-user"></span>问题管理系统
	</h2>
	<div class="container">
		<s:if test='user.role eq "系统管理员"'>
		<div class="col-sm-8 col-sm-offset-2">
			<div class="btn-group btn-group-justified">
				<a href="addProject.do" class="btn btn-primary">新建项目</a>
			</div>
			<div class="btn-group btn-group-justified">
				<a href="projectList.do" class="btn btn-success">项目列表</a>
			</div>
			<div class="btn-group btn-group-justified">
				<a href="problemList.do" class="btn btn-info">问题列表</a>
			</div>
			<div class="btn-group btn-group-justified">
				<a href="employeeList.do" class="btn btn-warning">员工列表</a>
			</div>
			<div class="btn-group btn-group-justified">
				<a href="roleList.do" class="btn btn-primary">角色列表</a>
			</div>
		</div>
		</s:if>
		<s:else>
			<!-- 主页项目信息 -->
			<table class="table table-striped table-bordered table-hover table-condensed table-responsive">
				<tr class="info">
					<td colspan="2"><h3>${projectInfo.projectName }</h3></td>
					<td rowspan="2">
						<div class="btn-group btn-group-lg">
							<s:if test="projectInfo.projectId != 1">
							<a href="projectDetail.do?projectId=${projectInfo.projectId }" 
								class="btn btn-info">详情</a></s:if>
						</div>
					</td>
				</tr>
				<tr class="info">
					<td colspan="2">
						<b>项目详情:</b><h4>${projectInfo.projectDescription }</h4>
					</td>
				</tr>
				<tr class="success">
					<td colspan="3">
						<div class="btn-group btn-group-justified col-sm-4">
							<a href="projectList.do" class="btn btn-success">项目列表</a>
						</div>
					</td>
				</tr>
				<tr class="success">
					<td colspan="3">
						<div class="btn-group btn-group-justified col-sm-4">
							<a href="problemList.do" class="btn btn-success">问题列表</a>
						</div>
					</td>
				</tr>
				<tr class="success">
					<td colspan="3">
						<div class="btn-group btn-group-justified col-sm-4">
							<a href="personalInfo.do" class="btn btn-success">个人信息</a>
						</div>
					</td>
				</tr>
			</table>
		</s:else>
	</div>
	
<script src="resources/bootstrap/js/jquery.min.js"></script>
<script src="resources/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
